﻿/***********************************************************************
 * <copyright file="AcountDetailEntity.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   TuanMH
 * Email:    TuanMH@buca.vn
 * Website:
 * Create Date: 11 April 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/


using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessVoucher
{
    /// <summary>
    /// AcountDetailEntity
    /// </summary>
    public class ItemTransactionDetail : BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AcountDetailEntity"/> class.
        /// </summary>
        public ItemTransactionDetail()
        {
          //  AddRule(new ValidateId("AcountDetailId"));
        }


        /// <summary>
        /// Initializes a new instance of the <see cref="AcountDetailEntity"/> class.
        /// </summary>
        /// <param name="itemTransactionDetailId">The item transaction detail identifier.</param>
        /// <param name="inventoryItemId">The inventory item identifier.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="correspondingAcountNumber">The corresponding account number.</param>
        /// <param name="description">The description.</param>
        /// <param name="amountOc">The amount oc.</param>
        /// <param name="refId">The reference identifier.</param>
        /// <param name="quantity">The quantity.</param>
        /// <param name="price">The price.</param>
        /// <param name="taxRate">The tax rate.</param>
        /// <param name="amountVat">The amount vat.</param>
        /// <param name="accountNumberVat">The account number vat.</param>
        public ItemTransactionDetail(long itemTransactionDetailId, int inventoryItemId, string accountNumber, string correspondingAcountNumber, string description, decimal amountOc, long refId, int quantity, decimal price, decimal taxRate, decimal amountVat, string accountNumberVat, int? voucherTypeId)  
        {
            ItemTransactionDetailId = itemTransactionDetailId; 
            InventoryItemId = inventoryItemId;
            AccountNumber = accountNumber;
            CorrespondingAccountNumber = correspondingAcountNumber;
            Description = description;
            AmountOc = amountOc;
            AmountVat = amountVat;
            TaxRate = taxRate;
            AccountNumberVat = accountNumberVat;
            RefId = refId;
            Quantity = quantity;
            Price = price;
            VoucherTypeId = voucherTypeId;
        }

        
        /// <summary>
        /// Gets or sets the cash detail identifier.
        /// </summary>
        /// <value>
        /// The cash detail identifier.
        /// </value>
        public long ItemTransactionDetailId { get; set; }

        /// <summary>
        /// Gets or sets the cash detail identifier.
        /// </summary>
        /// <value>
        /// The cash detail identifier.
        /// </value>
        public int InventoryItemId { get; set; }

        /// <summary>
        /// Gets or sets the account number.
        /// </summary>
        /// <value>
        /// The account number.
        /// </value>
        public string AccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the account number.
        /// </summary>
        /// <value>
        /// The account number.
        /// </value>
        public string AccountNumberVat { get; set; } 

        /// <summary>
        /// Gets or sets the corresponding account number.
        /// </summary>
        /// <value>
        /// The corresponding account number.
        /// </value>
        public string CorrespondingAccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        /// 
        public decimal AmountOc { get; set; }
        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        public decimal AmountVat { get; set; }

        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        public decimal TaxRate { get; set; } 


        /// <summary>
        /// Gets or sets the reference identifier.
        /// </summary>
        /// <value>
        /// The reference identifier.
        /// </value>
        public long RefId { get; set; }

        /// <summary>
        /// Gets or sets the cash detail identifier.
        /// </summary>
        /// <value>
        /// The cash detail identifier.
        /// </value>
        public int Quantity { get; set; }

        /// <summary>
        /// Gets or sets the cash detail identifier.
        /// </summary>
        /// <value>
        /// The cash detail identifier.
        /// </value>
        public decimal Price { get; set; }

        /// <summary>
        /// Gets or sets the voucher type identifier.
        /// </summary>
        /// <value>
        /// The voucher type identifier.
        /// </value>
        public int? VoucherTypeId { get; set; }
    }
}
